<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="<%=application.getContextPath()%>/css/css.css"
	rel="stylesheet" type="text/css" />
<script type="text/javascript"
	src="<%=application.getContextPath()%>/js/jquery-1.6.min.js"></script>
<script language="javascript"
	src="<%=application.getContextPath()%>/js/calendar_eu.js"></script>
<script type="text/javascript"
	src="<%=application.getContextPath()%>/js/jquery-ui-1.8.17.custom.min.js"></script>
<link rel="stylesheet"
	href="<%=application.getContextPath()%>/css/jquery-ui-1.8.17.custom.css" />
<script type="text/javascript"
	src="<%=application.getContextPath()%>/js/jquery.validate.js"></script>
<script type="text/javascript"
	src="<%=application.getContextPath()%>/js/jquery.validate.min.js"></script>

<script type="text/javascript">
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
</script>
<script>
  $(document).ready(function(){
    $("#localform").validate({
  messages: {
	  expnsesDate:
      {
          required: "Date must not be empty.",
      },    
      trLtr:
      {
          required: "Kms must not be empty.",  
      },    
      trPerLtr:
      {
          required: "Per Km must not be empty.",
      }    
   
  }
});
  });
</script>
<script>
  $(document).ready(function(){
    $("#outform").validate({
  messages: {
	  otexpnsesDate1:
      {
          required: "Date must not be empty.",
      },    
      otexpnsesDate2:
      {
          required: "Date must not be empty.",  
      }  
   
  }
});
  });
</script>
<script>
  $(document).ready(function(){
    $("#mbllform").validate({
  messages: {
	  mbMonth:
      {
          required: "Month must not be empty.",
      },    
      mbYear:
      {
          required: "Year must not be empty.",  
      }   
   
  }
});
  });
</script>
</head>
<style>
#editor {
	width: 95%;
}

#remarksEditor {
	width: 95%;
}

#nextsteppopup {
	position: absolute;
	z-index: 200; /* aaaalways on top*/
	padding: 3px;
	width: 250px;
	color: white;
}

.ui-dialog .ui-state-error {
	padding: .3em;
}

.ui-corner-all {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: normal;
	color: #666666;
	text-decoration: none;
}

.ui-corner-all:hover {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: normal;
	color: #666666;
	text-decoration: none;
}

.logout {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	height: 15px;
	width: 50px;
	font-weight: normal;
	color: red;
	text-decoration: none;
}

#bulletinDialog title {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: bold;
}

.textarea1 {
	height: 50px;
}
</style>

<script>

	$(function() {
		$( "#expnsesDate" ).datepicker({ dateFormat: "dd-mm-yy" });
		$( "#otexpnsesDate1" ).datepicker({ dateFormat: "dd-mm-yy" });
		$( "#otexpnsesDate2" ).datepicker({ dateFormat: "dd-mm-yy" });
	});
	</script>
<script>

	$(function() {
		$( "#expenseAccordion" ).accordion({
			active: false,
			collapsible: true,
			autoHeight: false
			});
	});
	</script>
<body
	onLoad="MM_preloadImages('<%=application.getContextPath()%>/images/travel-hover.jpg','<%=application.getContextPath()%>/images/os-hover.jpg')">
	
		<table width="927" style="height: 880px" border="0" align="center"
			cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
			<tr>
				<td height="116" align="left" valign="top"
					background="<%=application.getContextPath()%>/images/top-bg.jpg"
					style="background-repeat: repeat-x; background-position: left top">
					<%@ include file="common/exe-header.jsp"%>
				</td>
			</tr>
			<tr>
				<td align="left" valign="top">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td align="left" valign="top">&nbsp;&nbsp; <a
								href="<%=application.getContextPath()%>/user/open.do"><img
									src="<%=application.getContextPath()%>/images/home1.jpg"
									width="20" height="20" border="0" /> </a></td>
							<td align="center" valign="top">
								<%
									if (request.getParameter("success") != null) {
										out.println(request.getParameter("success"));
									}
								%>
							</td>
							<td width="8%" align="center"><a
								href="<%=application.getContextPath()%>/user/logout.do"
								style="font-family: sans-serif;">&nbsp;&nbsp;Logout</a>
							</td>
						</tr>

					</table></td>
			</tr>

			<tr>
				<td align="left" valign="top">
					<table width="98%" align="center" height="298" border="0"
						cellpadding="0" cellspacing="0">
						<tr>
							<td width="100%" align="center" valign="top">
								<table width="100%" height="625" cellpadding="0" cellspacing="0"
									class="box-border1">
									<tr>

										<td width="99%" align="left" valign="top">
											<table width="100%" border="0" cellspacing="0"
												cellpadding="0">
												<tr>
													<td height="20" align="center" valign="middle"
														style="background:url(<%=application.getContextPath()%>/images/hed-bg-block.jpg); background-repeat:repeat-x"
														class="hed2"><strong>Expenses</strong>
													</td>
												</tr>
												<tr>
													<td height="20" align="center" class="icon-header2"></td>
												</tr>

												<tr>
													<td height="20" align="center" class="icon-header2"></td>
												</tr>
												<tr>
												
													<td height="20" align="left" class="icon-header2">
														<div id="expenseAccordion">
															<h3>
																<a href="#">Local Conveyance</a>
															</h3>
															<div>
															<form action="<%=application.getContextPath()%>/expenses/localsave.do" method="post" name="localform" id="localform">
																<table width="100%" border="0" cellspacing="0"
																	cellpadding="0">

																	<tr>
																		<td>
																		<div id="localConvy">
																			<table width="100%" border="0" cellspacing="0"
																				cellpadding="0">

																				<tr>
																					<td height="10" align="right" class="hed-blc"></td>
																					<td></td>
																					<td></td>
																					<td></td>
																					<td width="19%"></td>
																					<td width="1%"></td>
																					<td width="34%"></td>
																				</tr>

																				<tr>
																					<td height="10" align="right" class="hed-blc"></td>
																					<td></td>
																					<td></td>
																					<td></td>
																					<td width="19%"></td>
																					<td width="1%"></td>
																					<td width="34%"></td>
																				</tr>
																				<tr>
																					<td height="21" align="right" class="hed-blc">Date:</td>
																					<td>&nbsp;</td>
																					<td><input name="expnsesDate" type="text"
																						class="textfield required" id="expnsesDate"
																						tabindex="1" />
																					</td>
																					<td>&nbsp;</td>
																					<td height="21" align="right" class="hed-blc">Kms:</td>
																					<td>&nbsp;</td>
																					<td><input name="trLtr" type="text"
																						class="textfield required number" id="trLtr"
																						onChange="javascript: gettotal()" tabindex="4" />
																					</td>
																				</tr>

																				<tr>
																					<td height="10" align="right" class="hed-blc"></td>
																					<td></td>
																					<td></td>
																					<td></td>
																					<td width="19%"></td>
																					<td width="1%"></td>
																					<td width="34%"></td>
																				</tr>
																				<tr>
																					<td height="21" align="right" class="hed-blc">From:</td>
																					<td>&nbsp;</td>
																					<td><input name="trFrom" type="text" class="textfield" id="trFrom" tabindex="2" />
																					</td>

																					<td width="1%">&nbsp;</td>
																					<td height="21" align="right" class="hed-blc">Per
																						Km:</td>
																					<td>&nbsp;</td>
																					<td><input name="trPerLtr" type="text"
																						class="textfield required number " id="trPerLtr"
																						onChange="javascript: gettotal()" tabindex="5" />
																					</td>
																				</tr>

																				<tr>
																					<td height="10" align="right" class="hed-blc"></td>
																					<td></td>
																					<td></td>
																					<td></td>
																					<td width="19%"></td>
																					<td width="1%"></td>
																					<td width="34%"></td>
																				</tr>
																				<tr>
																					<td width="20%" height="20" align="right"
																						class="hed-blc">To:</td>
																					<td width="1%">&nbsp;</td>
																					<td width="24%"><input name="trTo" type="text"
																						class="textfield" id="trTo" tabindex="3" /></td>
																					<td>&nbsp;</td>
																					<td height="21" align="right" class="hed-blc">Total:</td>
																					<td>&nbsp;</td>
																					<td><input name="trTotal" type="text"
																						class="textfield" id="trTotal" tabindex="6" />
																					</td>
																				</tr>

																			</table>
																			</div>
																			</td>
																			</tr>
																			<tr>
																			<td height="10">&nbsp;</td>
																			</tr>
																			
																			<tr>
										<td height="10">
											<table width="100%">
												<tr>
													<td width="80%"></td>
													<td width="9%"><input type="submit"
														class="button-black-right" value="Submit" />
													</td>
													<td width="9%"><input type="reset"
														class="button-black" value="Clear"  />
													</td>
													<td width="9%"><input type="button" id="localListBtnId"
														class="button-black" value="List"  />
													</td>

													<td width="1%">&nbsp;</td>
													<td width="1%">&nbsp;&nbsp;</td>
												</tr>
											</table>
										</td>

									</tr>
									<tr>
																			<td height="10">
																			<div id="localConvyList" style="display: none">
																			
																			</div>
																			</td>
																			</tr>
																</table>
																</form>
															</div>
															<h3>
																<a href="#">Outstation Expenses</a>
															</h3>
															<div>
															<form action="<%=application.getContextPath()%>/expenses/outsave.do" method="post" name="outform" id="outform">
																<table width="100%" border="0" cellspacing="0"
																	cellpadding="0">

																	<tr>
																		<td>
																<table width="100%" border="0" cellspacing="0"
																	cellpadding="0">

																	<tr>
																		<td width="20%" height="10" align="right"
																			class="hed-blc"></td>
																		<td width="1%"></td>
																		<td width="24%"></td>
																		<td></td>
																		<td width="19%"></td>
																		<td width="1%"></td>
																		<td width="34%"></td>
																	</tr>

																	<tr>
																		<td height="10" align="right" class="hed-blc"></td>
																		<td></td>
																		<td></td>
																		<td></td>
																		<td width="19%"></td>
																		<td width="1%"></td>
																		<td width="34%"></td>
																	</tr>
																	<tr>
																		<td height="21" align="right" class="hed-blc">From:</td>
																		<td>&nbsp;</td>
																		<td><input name="otexpnsesDate1" type="text"
																			class="textfield required" id="otexpnsesDate1"
																			tabindex="7" /></td>
																		<td>&nbsp;</td>
																		<td height="21" align="right" class="hed-blc">To:</td>
																		<td>&nbsp;</td>
																		<td><input name="otexpnsesDate2" type="text"
																			class="textfield required" id="otexpnsesDate2"
																			tabindex="8" /></td>
																	</tr>
																	<tr>
																		<td height="10" align="right" class="hed-blc"></td>
																		<td></td>
																		<td></td>
																		<td></td>
																		<td width="19%"></td>
																		<td width="1%"></td>
																		<td width="34%"></td>
																	</tr>
																	<tr>
																		<td align="right"><span class="hed-blc">Particulars:</span>
																		</td>
																		<td>&nbsp;</td>
																		<td><input name="particulars" type="text"
																			class="textfield" id="particulars" tabindex="9" />
																		</td>
																		<td>&nbsp;</td>
																		<td align="right"><span class="hed-blc">Entertainment:</span>
																		</td>
																		<td>&nbsp;</td>
																		<td><input name="entertainment" type="text"
																			class="textfield number" id="entertainment"
																			tabindex="10" />
																		</td>
																	</tr>

																	<tr>
																		<td height="10" align="right" class="hed-blc"></td>
																		<td></td>
																		<td></td>
																		<td></td>
																		<td width="19%"></td>
																		<td width="1%"></td>
																		<td width="34%"></td>
																	</tr>
																	<tr>
																		<td align="right"><span class="hed-blc">Travel:</span>
																		</td>
																		<td>&nbsp;</td>
																		<td><input name="travel" type="text"
																			class="textfield number" id="travel" tabindex="11" />
																		</td>
																		<td width="1%">&nbsp;</td>
																		<td align="right"><span class="hed-blc">Hotel:</span>
																		</td>
																		<td>&nbsp;</td>
																		<td><input name="hotel" type="text"
																			class="textfield number" id="hotel" tabindex="12" />
																		</td>
																	</tr>
																	<tr>
																		<td height="10" align="right" class="hed-blc"></td>
																		<td></td>
																		<td></td>
																		<td></td>
																		<td width="19%"></td>
																		<td width="1%"></td>
																		<td width="34%"></td>
																	</tr>
																	<tr>
																		<td align="right"><span class="hed-blc">Others:</span>
																		</td>
																		<td>&nbsp;</td>
																		<td><input name="others" type="text"
																			class="textfield number" id="others" tabindex="13" />
																		
																		</td>
																		<td width="1%">&nbsp;</td>
																		<td height="21" align="right" class="hed-blc">&nbsp;</td>
																		<td>&nbsp;</td>
																		<td>&nbsp;</td>
																	</tr>

																	<tr>
																		<td height="10" align="right" class="hed-blc"></td>
																		<td></td>
																		<td></td>
																		<td></td>
																		<td width="19%"></td>
																		<td width="1%"></td>
																		<td width="34%"></td>
																	</tr>
																	</table>
																	</td>
																	</tr>
																	<tr>
										<td height="10">
											<table width="100%">
												<tr>
													<td width="80%"></td>
													<td width="9%"><input type="submit"
														class="button-black-right" value="Submit" />
													</td>
													<td width="9%"><input type="reset"
														class="button-black" value="Clear"  />
													</td>
													<td width="9%"><input type="button" id="outStnListBtnId"
														class="button-black" value="List"  />
													</td>
													<td width="1%">&nbsp;</td>
													<td width="1%">&nbsp;&nbsp;</td>
												</tr>
											</table>
										</td>

									</tr>
									<tr>
																			<td height="10">
																			<div id="outStationList" style="display: none">
																			
																			</div>
																			</td>
																			</tr>
																</table>
																</form>
															</div>
															<h3>
																<a href="#">Mobile Expenses</a>
															</h3>
															<div>
															<form action="<%=application.getContextPath()%>/expenses/mblsave.do" method="post" name="mblform" id="mbllform">
																<table width="100%" border="0" cellspacing="0"
																	cellpadding="0">

																	<tr>
																		<td>
																<table width="100%" border="0" cellspacing="0"
																	cellpadding="0">

																	<tr>
																		<td width="20%" height="10" align="right"
																			class="hed-blc"></td>
																		<td width="1%"></td>
																		<td width="24%"></td>
																		<td></td>
																		<td width="19%"></td>
																		<td width="1%"></td>
																		<td width="34%"></td>
																	</tr>
																	<tr>
																		<td align="right"><span class="hed-blc">Month</span>
																		</td>
																		<td>&nbsp;</td>
																		<td><select id="mbMonth" name="mbMonth" class="textfield required">
																			<option value="">Select</option>
																			<option value="01">Jan</option>
																			<option value="02">Feb</option>
																			<option value="03">Mar</option>
																			<option value="04">Apr</option>
																			<option value="05">May</option>
																			<option value="06">Jun</option>
																			<option value="07">Jul</option>
																			<option value="08">Aug</option>
																			<option value="09">Sep</option>
																			<option value="10">Oct</option>
																			<option value="11">Nov</option>
																			<option value="12">Dec</option>
																		</select>
																		</td>
																		<td></td>
																		<td align="right"><span class="hed-blc">Year</span>
																		</td>
																		<td>&nbsp;</td>
																		<td><select id="mbYear" name="mbYear" class="textfield required">
																			<option value="">Select</option>
																			<option value="2012">2012</option>
																			<option value="2013">2013</option>
																			<option value="2014">2014</option>
																			<option value="2015">2015</option>
																			<option value="2016">2016</option>
																			<option value="2017">2017</option>
																			<option value="2018">2018</option>
																			<option value="2019">2019</option>
																			<option value="2020">2020</option>
																			<option value="2021">2021</option>
																			<option value="2022">2022</option>
																			<option value="2023">2023</option>
																		</select>
																		</td>


																	</tr>
																	<tr>
																		<td height="10" align="right" class="hed-blc"></td>
																		<td></td>
																		<td></td>
																		<td></td>
																		<td width="19%"></td>
																		<td width="1%"></td>
																		<td width="34%"></td>
																	</tr>
																	<tr>
																		<td align="right"><span class="hed-blc">Limit</span>
																		</td>
																		<td>&nbsp;</td>
																		<td><input name="limit" type="text"
																			class="textfield number" id="limit" tabindex="12"
																			value="500" readonly="readonly" />
																		</td>
																		<td></td>
																		<td align="right"><span class="hed-blc">Remarks</span>
																		</td>
																		<td>&nbsp;</td>
																		<td rowspan="3"><textarea name="remarks"
																				id="remarks" class="textarea1"></textarea>
																		</td>


																	</tr>

																	<tr>
																		<td height="10" align="right" class="hed-blc"></td>
																		<td></td>
																		<td></td>
																		<td></td>
																		<td width="19%"></td>
																		<td width="1%"></td>

																	</tr>
																	<tr>
																		<td align="right" class="hed-blc">Spend</td>
																		<td>&nbsp;</td>
																		<td><input name="spend" type="text"
																			class="textfield number" id="spend" />
																		</td>
																		<td width="1%">&nbsp;</td>
																		<td height="21" align="right" class="hed-blc"></td>
																		<td>&nbsp;</td>

																	</tr>
																	<tr>
																		<td height="10" align="right" class="hed-blc"></td>
																		<td></td>
																		<td></td>
																		<td></td>
																		<td width="19%"></td>
																		<td width="1%"></td>
																		<td width="34%"></td>
																	</tr>
																	</table>
																	</td>
																	</tr>
									<tr>
										<td height="10">
											<table width="100%">
												<tr>
													<td width="80%"></td>
													<td width="9%"><input type="submit"
														class="button-black-right" value="Submit" />
													</td>
													<td width="9%"><input type="reset"
														class="button-black" value="Clear"  />
													</td>
													<td width="9%"><input type="button" id="mblListBtnId"
														class="button-black" value="List"  />
													</td>
													<td width="1%">&nbsp;</td>
													<td width="1%">&nbsp;&nbsp;</td>
												</tr>
											</table>
										</td>

									</tr>
									<tr>
																			<td height="10">
																			<div id="mblExpnsesList" style="display: none">
																			
																			</div>
																			</td>
																			</tr>
																</table>
																</form>
															</div>
														</div></td>
												</tr>
											</table></td>
									</tr>


									<tr>
										<td height="10">&nbsp;</td>

									</tr>
									
								</table>
							</td>
						</tr>
					</table></td>
			</tr>

			<tr>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td height="40" align="left" valign="top" bgcolor="#0B0B0B">&nbsp;</td>
			</tr>
		</table>
	
</body>
</html>
<script type="text/javascript">
function gettotal(){
	var kms=$("#trLtr").val();
	var prkms=$("#trPerLtr").val();
	var k=0;
	var pk=0;
	if(kms!=""){
		k=parseInt(kms);
	}
	if(prkms!=""){
		pk=parseFloat(prkms);
	}
	var total=k*pk;
	total=total.toFixed(2);
	$("#trTotal").val(total);
}
</script>
<script type="text/javascript">
$("#localListBtnId").click(function(){
	$.ajax({
		url:"<%=application.getContextPath()%>/expenses/getLocalConvyList.do",
		mimetype : "text/html",
		cache : false,
		success : function(res) {
			$("#localConvyList").html(res);
			$("#localConvyList").show();
			
		}
		});
	
});
</script>
<script type="text/javascript">
$("#outStnListBtnId").click(function(){
	$.ajax({
		url:"<%=application.getContextPath()%>/expenses/getOutStationList.do",
		mimetype : "text/html",
		cache : false,
		success : function(res) {
			$("#outStationList").html(res);
			$("#outStationList").show();
			
		}
		});
	
});
</script>
<script type="text/javascript">
$("#mblListBtnId").click(function(){
	$.ajax({
		url:"<%=application.getContextPath()%>/expenses/getMblList.do",
		mimetype : "text/html",
		cache : false,
		success : function(res) {
			$("#mblExpnsesList").html(res);
			$("#mblExpnsesList").show();
			
		}
		});
	
});
</script>
<script type="text/javascript">
function getDetails(){
	
	 var edate=$("#expnsesDate").val();
	 if(edate!=""){
		 
	var data="expdate="+edate;
	$.ajax({
		url:"<%=application.getContextPath()%>/expenses/getDetails.do",
						mimetype : "text/plain",
						method : "post",
						cache : false,
						data : data,
						success : function(res) {
							var today = new Date();
							var dd = today.getDate();
							var mn = today.getMonth() + 1;
							var yy = today.getFullYear();
							var cdt = dd + "-0" + mn + "-" + yy;
							if (cdt != edate) {
								$("#trFrom").attr("readonly", "readonly");
								$("#trTo").attr("readonly", "readonly");
								$("#trLtr").attr("readonly", "readonly");
								$("#trPerLtr").attr("readonly", "readonly");
								$("#particulars").attr("readonly", "readonly");
								$("#travel").attr("readonly", "readonly");
								$("#hotel").attr("readonly", "readonly");
								$("#entertainment")
										.attr("readonly", "readonly");
								$("#others").attr("readonly", "readonly");
								$("#limit").attr("readonly", "readonly");
								$("#spend").attr("readonly", "readonly");
								$("#remarks").attr("readonly", "readonly");

							} else {
								$("#trFrom").removeAttr("readonly");
								$("#trTo").removeAttr("readonly");
								$("#trLtr").removeAttr("readonly");
								$("#trPerLtr").removeAttr("readonly");
								$("#particulars").removeAttr("readonly");
								$("#travel").removeAttr("readonly");
								$("#hotel").removeAttr("readonly");
								$("#entertainment").removeAttr("readonly");
								$("#others").removeAttr("readonly");
								$("#limit").removeAttr("readonly");
								$("#spend").removeAttr("readonly");
								$("#remarks").removeAttr("readonly");
							}
							if (res != "") {
								var temp = res.split("/");
								var trtot = parseFloat(temp[2])
										* parseFloat(temp[3]);
								$("#trTotal").val(trtot.toFixed(2));
								$("#trFrom").val(temp[0]);
								$("#trTo").val(temp[1]);
								$("#trLtr").val(temp[2]);
								$("#trPerLtr").val(temp[3]);
								$("#particulars").val(temp[4]);
								$("#travel").val(temp[5]);
								$("#hotel").val(temp[6]);
								$("#entertainment").val(temp[7]);
								$("#others").val(temp[8]);
								$("#limit").val(temp[9]);
								$("#spend").val(temp[10]);
								$("#remarks").val(temp[11]);

							} else {
								$("#trFrom").val("");
								$("#trTo").val("");
								$("#trLtr").val("");
								$("#trPerLtr").val("");
								$("#particulars").val("");
								$("#travel").val("");
								$("#hotel").val("");
								$("#entertainment").val("");
								$("#others").val("");
								$("#limit").val("");
								$("#spend").val("");
								$("#remarks").val("");

							}
						}

					});
		}
	}
</script>